<?php

namespace Database\Seeders;

use App\Models\Role;
use Illuminate\Database\Seeder;

class RoleSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        Role::create([
            'name' => 'permission_admin',
            'cn_name' => '权限管理员',
            'guard_name' => 'api'
        ])->syncPermissions([1, 2, 3, 4, 5]);

        Role::create([
            'name' => 'roles_admin',
            'cn_name' => '角色管理员',
            'guard_name' => 'api'
        ])->syncPermissions([6, 7, 8, 9, 10, 11, 12]);

        Role::create([
            'name' => 'sections_admin',
            'cn_name' => '部门管理员',
            'guard_name' => 'api'
        ])->syncPermissions([13, 14, 15, 16, 17, 18, 19]);

        Role::create([
            'name' => 'settings_admin',
            'cn_name' => '网站配置管理员',
            'guard_name' => 'api'
        ])->syncPermissions([20, 21, 22, 23]);

        Role::create([
            'name' => 'testList_admin',
            'cn_name' => '试卷管理员',
            'guard_name' => 'api'
        ])->syncPermissions([24, 25, 26, 27, 28, 29, 30, 31, 32, 33]);

        Role::create([
            'name' => 'categories_admin',
            'cn_name' => '分类管理员',
            'guard_name' => 'api'
        ])->syncPermissions([34, 35, 36, 37, 38, 39]);

        Role::create([
            'name' => 'questions_admin',
            'cn_name' => '题库管理员',
            'guard_name' => 'api'
        ])->syncPermissions([40, 41, 42, 43, 44, 45, 46]);

        Role::create([
            'name' => 'examinations_admin',
            'cn_name' => '考试管理员',
            'guard_name' => 'api'
        ])->syncPermissions([47, 48, 49, 50, 51, 52, 53]);
    }
}
